using System;
using System.Collections.Generic;
using Module.Common.Models;
using Module.Core.DAO;
using Module.Core.EntitiesInfo;

namespace Module.Core.BusinessLogic
{
    public class CommentProductsBL
	{
		/// <summary>
		/// Saves a record to the CommentProducts table.
		/// </summary>
		public static int Insert(CommentProductsInfo commentProductsInfo)
		{
			try
			{
				return new CommentProductsDAO().Insert(commentProductsInfo);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

		/// <summary>
		/// Saves a record to the CommentProducts table.
		/// </summary>
        public static void Update(CommentProductsInfo commentProductsInfo)
		{
			try
			{
				new CommentProductsDAO().Update(commentProductsInfo);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

		/// <summary>
		/// Delete a record from the CommentProducts table.
		/// </summary>
        public static void Delete(int id)
		{
			try
			{
				new CommentProductsDAO().Delete(id);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

		/// <summary>
		/// Selects a single record from the CommentProducts table.
		/// </summary>
        public static CommentProductsInfo Select(int id)
		{
			try
			{
				return new CommentProductsDAO().Select(id);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

		/// <summary>
		/// Selects all records from the CommentProducts table.
		/// </summary>
        public static CHRTList<CommentProductsInfo> SelectAll()
		{
			try
			{
				return new CommentProductsDAO().SelectAll();
			}
			catch (Exception ex)
			{
				throw;
			}

		}

	}
}
